![]() |
RemoveIndexedCollectionItem |
||||
Header: | Collections.h | Carbon status: | Supported | |
Removes an item from a collection given the item’s index.
OSErr RemoveIndexedCollectionItem ( Collection c, SInt32 index );
A reference to the collection object from which you want to remove the item. The behavior of this function is undefined if you do not provide a reference to a valid collection object.
The collection index of the item you want to remove.
A result code. If the c collection does not contain an item whose collection index matches the values in the index parameter, this function returns a collectionIndexRangeErr result code.
The RemoveIndexedCollectionItem function removes the item specified by the index parameter from the collection referenced by the c parameter. This function removes the specified item even if its lock attribute is set.
To remove a collection item using the item’s tag and ID (rather than the item’s index), use the RemoveCollectionItem function.
To replace an item in a collection, use the function ReplaceIndexedCollectionItem.
Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.
© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)